//
//  UITextField+XMGTextField.m
//  SanFangLianKong
//
//  Created by x on 2017/5/2.
//  Copyright © 2017年 zhaidanhui. All rights reserved.
//

#import "UITextField+XMGTextField.h"

@implementation UITextField (XMGTextField)

+ (UITextField *)textFiled:(UIColor *)textColor placeholder:(NSString *)placeholder tag:(NSInteger)tag target:(id)target action:(SEL)action {
    UITextField *textFiled = [[UITextField alloc] init];
    textFiled.delegate = target;
    textFiled.tag = tag;
    textFiled.translatesAutoresizingMaskIntoConstraints = NO;
    textFiled.textColor = textColor;
    textFiled.borderStyle = UITextBorderStyleNone;
    textFiled.placeholder = placeholder;
    textFiled.font = [UIFont systemFontOfSize:18];
    [textFiled addTarget:target action:action forControlEvents:UIControlEventEditingDidEndOnExit];
    
    return textFiled;
}
@end
